//
//  ZhuceViewController.m
//  UI_Homework_02
//
//  Created by 黄威 on 16/5/11.
//  Copyright © 2016年 黄威. All rights reserved.
//

#import "ZhuceViewController.h"

@interface ZhuceViewController ()

@end

@implementation ZhuceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self create];
}



- (void)create{

   self.navigationItem.title = @"注册";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(handleleft)];
    UITextField *text1 = [[UITextField alloc]initWithFrame:CGRectMake(90, 120, 200, 40)];
    UITextField *text2 = [[UITextField alloc]initWithFrame:CGRectMake(90, 200, 200, 40)];
    UITextField *text3 = [[UITextField alloc]initWithFrame:CGRectMake(90, 280, 200, 40)];
    
    text1.placeholder = @"请输入用户名";
    text2.placeholder = @"请输入密码";
    text3.placeholder = @"请确认密码";
    
    text1.backgroundColor = [UIColor purpleColor];
    text2.backgroundColor = [UIColor purpleColor];
    text3.backgroundColor = [UIColor purpleColor];
    
    self.view.backgroundColor = [UIColor cyanColor];
    UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(140, 400, 100, 60)];
    button.backgroundColor = [UIColor purpleColor];
    [button setTitle:@"注册" forState:UIControlStateNormal];
    [self.view addSubview:button];
    [self.view addSubview: text3];
    [self.view addSubview: text2];
    [self.view addSubview:text1];


    [button addTarget:self action:@selector(handleleft) forControlEvents:UIControlEventTouchUpInside];

    [text3 release];
    [text2 release];
    [text1 release];
    
    [button release];
    

}


- (void)handleleft{

    [self.navigationController popViewControllerAnimated:YES];


}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
